package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 群聊（存储群聊基本信息及管理配置）对象 chat_group
 * 
 * @author ruoyi
 * @date 2025-09-12
 */
public class ChatGroup extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 群聊唯一标识（主键） */
    private String groupId;

    /** 群聊名称 */
    @Excel(name = "群聊名称")
    private String groupName;

    /** 群主用户ID（关联用户表） */
    @Excel(name = "群主用户ID", readConverterExp = "关=联用户表")
    private Long ownerId;

    /** 最大成员数量限制（默认200人） */
    @Excel(name = "最大成员数量限制", readConverterExp = "默=认200人")
    private Long maxMemberCount;

    /** 当前成员数量 */
    @Excel(name = "当前成员数量")
    private Long currentMemberCount;

    /** 群公告内容 */
    @Excel(name = "群公告内容")
    private String announcement;

    /** 群公告最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "群公告最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date announcementUpdatedTime;

    /** 是否解散（0=正常，1=已解散） */
    @Excel(name = "是否解散", readConverterExp = "0==正常，1=已解散")
    private Long isDisbanded;

    /** 全体禁言结束时间（NULL表示未禁言） */
    @Excel(name = "全体禁言结束时间", readConverterExp = "N=ULL表示未禁言")
    private Date muteEndTime;

    /** 群聊头像URL */
    @Excel(name = "群聊头像URL")
    private String avatar;

    /** 是否删除（0=正常，1=已删除） */
    @Excel(name = "是否删除", readConverterExp = "0==正常，1=已删除")
    private Long isDeleted;

    /** 乐观锁版本号（用于并发控制） */
    @Excel(name = "乐观锁版本号", readConverterExp = "用=于并发控制")
    private Long version;

    /** 创建人ID（关联用户表） */
    @Excel(name = "创建人ID", readConverterExp = "关=联用户表")
    private String creator;

    public void setGroupId(String groupId) 
    {
        this.groupId = groupId;
    }

    public String getGroupId() 
    {
        return groupId;
    }

    public void setGroupName(String groupName) 
    {
        this.groupName = groupName;
    }

    public String getGroupName() 
    {
        return groupName;
    }

    public Long getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(Long ownerId) {
        this.ownerId = ownerId;
    }

    public void setMaxMemberCount(Long maxMemberCount)
    {
        this.maxMemberCount = maxMemberCount;
    }

    public Long getMaxMemberCount() 
    {
        return maxMemberCount;
    }

    public void setCurrentMemberCount(Long currentMemberCount) 
    {
        this.currentMemberCount = currentMemberCount;
    }

    public Long getCurrentMemberCount() 
    {
        return currentMemberCount;
    }

    public void setAnnouncement(String announcement) 
    {
        this.announcement = announcement;
    }

    public String getAnnouncement() 
    {
        return announcement;
    }

    public void setAnnouncementUpdatedTime(Date announcementUpdatedTime) 
    {
        this.announcementUpdatedTime = announcementUpdatedTime;
    }

    public Date getAnnouncementUpdatedTime() 
    {
        return announcementUpdatedTime;
    }

    public void setIsDisbanded(Long isDisbanded) 
    {
        this.isDisbanded = isDisbanded;
    }

    public Long getIsDisbanded() 
    {
        return isDisbanded;
    }

    public void setMuteEndTime(Date muteEndTime) 
    {
        this.muteEndTime = muteEndTime;
    }

    public Date getMuteEndTime() 
    {
        return muteEndTime;
    }

    public void setAvatar(String avatar) 
    {
        this.avatar = avatar;
    }

    public String getAvatar() 
    {
        return avatar;
    }

    public void setIsDeleted(Long isDeleted) 
    {
        this.isDeleted = isDeleted;
    }

    public Long getIsDeleted() 
    {
        return isDeleted;
    }

    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }

    public void setCreator(String creator) 
    {
        this.creator = creator;
    }

    public String getCreator() 
    {
        return creator;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("groupId", getGroupId())
            .append("groupName", getGroupName())
            .append("ownerId", getOwnerId())
            .append("maxMemberCount", getMaxMemberCount())
            .append("currentMemberCount", getCurrentMemberCount())
            .append("announcement", getAnnouncement())
            .append("announcementUpdatedTime", getAnnouncementUpdatedTime())
            .append("isDisbanded", getIsDisbanded())
            .append("muteEndTime", getMuteEndTime())
            .append("avatar", getAvatar())
            .append("isDeleted", getIsDeleted())
            .append("version", getVersion())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("creator", getCreator())
            .toString();
    }
}
